+ ATR Support and ResistanceThis, a very different script from most of mine, is my attempt at making a useful, and not messy, support and resistance indicator. If you've never looked into trader xkavalis, and his scripts and discord, I would highly recommend it. He talks about "pay attention candles" a lot. It got me thinking about what those are. Best as I can tell all he means by that phrase is large, impulsive candles. Sometimes these lead to break outs of ranges, or they may signal tops, bottoms, or near-tops and bottoms. The only way I could make sense of this in a mathematical way was by using the average true range. Basically, any candle's true range outside of the ATR is considered a "pay attention candle," by my definition.
This script originally began as just a candle coloring exercise with some optional shapes plotted above/below certain candles, but I quickly realized I wanted to draw lines or zones from these candles, so eventually, after many hours spent figuring out and learning 'line.new' and 'box.new' I got things sorted.
Essentially, my line of thinking is that on impulsive candles down, the origin of the impulse is more important than the close (not always of course, as there are no unbreakable rules in what markets can do), and with impulsive candles up, the same theory applies.
So, for upward impulsive candles I've marked out the zone from the open to the low as a support (until broken, in which case it may become resistance). For downward impulsive candles the zone encompasses the open to the high. I've given the option to plot a line from the close for all of these. It's turned off by default as it's just less stuff on the chart, but you may like it.
The line length is customizable in a menu. It does funny things on low timeframes on forex and stock charts (long lines that result in chart compression), but for some reason very rarely on crypto charts. If someone who is smart (not me) and has much experience with pinescript could perhaps help me out with a fix for this, that would be great. I suspect it has something to do with my "bar_index_duration" that I defined using the time function, but I'm not sure how or why.
Line length on time frames of one hour and up it is typically fine.
Use the ATR multiple to change the sensitivity of the indicator. This is basically the determination of when a candle is beyond the ATR. A multiple of two is two times the ATR. With lower volatile pairs you can maybe make this lower. On lower time frames or with more volatile pairs (illiquid alts in particular) a higher multiple might serve better. I find the default 1.75 is mostly acceptable.
As I started this I also thought adding some sort of volume information to the candles might be useful as well, so I added a simple candle coloring feature referencing the OBV and a 21 period EMA. Candles are colored based on the OBV's relation to its moving average.
I added some plot shapes and candle coloring utilizing the RSI as well. Options to turn on or off shapes plotted for overbought and oversold across the top of the chart. The most interesting feature that I implemented here is a support/resistance zone around the centerline of the RSI. If the RSI is between 49 and 51 then you can have optional candle coloring, shapes plotted above the candles, and s/r zones drawn on the chart. In trending markets the centerline of the RSI will frequetly act as support or resistance, so by being alerted of this condition on the chart you can use that with actual levels marked off in order to help make a judgement on a trade. I think it's a nice addition, and an oft overlooked aspect of the usefulness of the RSI.
I've also included a calculation, with candle coloring and/or plot shapes, for something like a stop run on high volume. The calculation for that is in its section below, and should be pretty self explanatory.
Lastly, typing this as I'm posting it, this indicator could also be useful for helping to find placement for trailing a stop. Just a thought!
ابحث في النصوص البرمجية عن "support resistance"
Pivot Boss - CPRThe Central Pivot Range (CPR) is used to identify key price points to set up trades. CPR is beneficial for intraday trading. This indicator can plot:
1. Daily Pivots and Daily Support/Resistance
2. Tomorrow Pivots and Support/Resistance
3. Weekly Pivots and Weekly Support/Resistance
4. Monthly Pivots and Monthly Support/Resistance
5. Previous Day High/Low
6. Previous Week and Month High/Low
Gunzo Market SRGunzo Market SR is a set of 3 tools combined for trend analysis on day trading strategy.
VWAP (Volume Weighted Average Price) :
The VWAP indicator is generally used for trend analysis. For example if the VWAP line is under the closing price for a long period of time, the trend is strong. In this script, the VWAP has been optimized for day trading as the indicator is calculated inside the daily range, and resets when a new day starts. This way the indicator reflects the daily trend and not the overall trend. You can also use the position of closing price according to the VWAP to find optimal entry points according to the indicator.
Highs / Lows :
The Highs / Lows are generally used for trend analysis too. The High / Lows are mainly used to identify prices that have been key during the past and that we can use as an indication for the following candles. In this script, the Highs / Lows are computed on the daily period and then displayed on the current period (recommended to use on a daily period or lower). This way the indicator reflects the highest point and the lowest point of the day (can be modified to have a longer range of pivot days even if I recommend to stay on 1 day for day trading).
Support / Resistance :
The Support / Resistance is generally used for trend analysis too. The Support / Resistance are found by searching local high and lows. The longer the supports and resistance are, the strongest it can be considered. In this script, the Highs / Lows are computed by default on a lower time frame (usually 3-4 times lower). For example on a 15 minute graph, the Highs / Lows will be computed on the 5 minute graph (can be modified if the displayed result is not optimized for your asset).
How to use this set of tools :
I personally recommend to use this tool at the start of your day of trading. This way you will get a clear vision of the daily situation and try to identify key prices and the trend for the current day. I then suggest to set up an alert on the key price to be notified when you're getting close to it.
Volume Support/ResistanceAn Indicator which shows the potential resistance/support level at K bar with significant trading volume.
The logic is stated below:
(current K-bar volume - the past average trading volume of 48 Ks) > 4 *standard deviation of trading volume
When this condition is met, it is considered that the trading volume is particularly enlarged, which may be an area where support pressure is possible
If the K is an ascending K-bar, then draw support at the lowest point; if the K is a descending K-bar, draw resistance at the highest point.
You can change the length and the number the standard deviation in the input section.
Support and Resistance LevelsDetecting Support and Resistance Levels
Description:
Support & Resistance levels are essential for every trader to define the decision points of the markets. If you are long and the market falls below the previous support level, you most probably have got the wrong position and better exit.
This script uses the first and second deviation of a curve to find the turning points and extremes of the price curve.
The deviation of a curve is nothing else than the momentum of a curve (and inertia is another name for momentum). It defines the slope of the curve. If the slope of a curve is zero, you have found a local extreme. The curve will change from rising to falling or the other way round.
The second deviation, or the momentum of momentum, shows you the turning points of the first deviation. This is important, as at this point the original curve will switch from acceleration to break mode.
Using the logic laid out above the support&resistance indicator will show the turning points of the market in a timely manner. Depending on level of market-smoothing it will show the long term or short term turning points.
This script first calculates the first and second deviation of the smoothed market, and in a second step runs the turning point detection.
Style tags: Trend Following, Trend Analysis
Asset class: Equities, Futures, ETFs, Currencies and Commodities
Dataset: FX Minutes/Hours/Days
Support and Resistance StrategySupport and resistance Strategy (FX and Crypto)
Description: This strategy uses “support” S and “resistance” R levels, which can be computed
using the “pivot point” (a.k.a. the “center”) C as follows:
C = (PH + PL + PC) / 3
R = 2 × C - PL
S = 2 × C - PH
Here PH, PL and PC are the previous day’s high, low and closing prices.
One way to define a trading signal is as follows (as above, P is the current price):
Signal:
Establish long position if P > C
Liquidate long position if P ≥ R
Establish short position if P < C
Liquidate short position if P ≤ S
Other definitions of the pivot point (e.g., using the current trading day’s open price) and
higher/lower support/resistance levels exist.
Style tags: Trend Following, Trend Analysis
Asset class: Equities, Futures, ETFs, Currencies and Commodities
Dataset: FX Minutes/Hours/Days
Pivot Support and Resistance Finder [JV] V1Hi Traders.
This is my first attempt of writing an indicator.
Let me start by saying I could never have done this without lmatl and WMX_Q_System_Trading who were and are an incredible source of inspiration.
This indicator shows horizontal Pivot Support and Resistance . It draws up to 4 horizontal lines extending to the right from and adds labels to High and Low Pivot Candles . It also draws the Support / Resistance that is currently forming.
You can select the number of lines on the current timeframe.
There are some options in Settings:
Current timeframe pivot settings
Show and hide levels of the current timeframe
Change colors
Extend Lines
Any suggestions are more than welcome!
I also welcome donations, no matter how small ;-)
Attrition Scalper v1.0A weird indicator to catch tops/bottoms and scalp with the signals. You should buy/sell with the signals but you should also analyze the chart manually before jumping straight into the trade. One of the most important thing is the middle VIDYA line. It is a very strong support/resistance and if you've taken a long/short from top/bottom, you might want to target there to exit as the indicator will not give you a sell signal there probably.
You should also after trying the indicator for a bit. Make a proper SL/TP strategy for it.
By default the indicator will only load with charts up to 30 minute frame. If you want to load on higher timeframe charts you have to increase the Timeframe to Lookback and the Timeframe options in it's settings.
I really recommend lower timeframes though, the default settings with 5 minute chart is most likely the best.
Each of the lines you see are pretty strong support/resistance and pivot points . So if you've taken an entry for a quick scalp you should most likely start partially closing the position on each line.
I wouldn't really recommend a tight stop as we're most likely entering at or near the bottom and the price really can't stay that overextended unless it's a major/flash dump, at that point no indicator is safe anyways. So finding the sweet spot is up to you.
If more lines are on top of each other, be careful of that spot too as it's a great confluence of support/resistance . For example if the top VIDYA line is near the upper purple 4.236 line. That is a major resistance and if price is above it, it will almost certainly test it back or fall back inside the channel.
Another strategy is to not use the buy/sell signals but use the channel/lines yourself on higher timeframe for swing trading or just putting orders at the other extreme ends/lines in the channel to catch a nice entry in flash/major dumps/pumps.
Price will most likely retrace to the middle VIDYA line after touching or overextending from the top VIDYA and upper purple 4.236 line. Same also applies for the opposite side too. Any close above/below the VIDYA might mean continuation but that's better seen and confirmed on much higher timeframes, not 5 minutes probably.
Special thanks to: www.tradingview.com i got inspired from some of his indicators and even used some snippets of code which he allowed me to do.
In the near future i'm thinking of implementing new logic with Weis Waves and few other indicators to increase the signal count as i think it's currently very low. But overtrading might be bad anyways.
Dual SuperTrend, Ichimoku and DMI Color Weighted by DGTThis study interprets SuperTrend with Ichimoku Cloud, one of the popular technical analysis indicator, and interprets Directional Movement (DMI), which is another quite valuable technical analysis indicator.
Then combines the interpreted SuperTrend with interpreted Directional Movement (DMI) and Volume Based Colored Bars indicator created by Kıvaç ÖZBİLGİÇ (permission has been granted from the author)
Here are details of the concept applied
1- SuperTrend Line colored based on Ichimoku Cloud
Definition
The Ichimoku Cloud, developed by Goichi Hosoda and published in the late 1960s, is a collection of technical indicators that give it a unique capacity to show support and resistance levels, momentum and trend direction
What Does the Ichimoku Cloud Tells?
The overall trend is up when price is above the cloud, known as Kumo Cloud, down when price is below the Kumo Cloud, and trendless or transitioning when price is in the Kumo Cloud
When Senkou Span A (Leading Span A) is rising and above Senkou Span B (Leading Span B), this helps confirm the uptrend and space between the lines is typically colored green. When Senkou Span A is falling and below Senkou Span B, this helps confirm the downtrend. The space between the lines is typically colored red
Traders often use the Kumo Cloud as an area of support and resistance depending on the relative location of the price. The Kumo Cloud provides support/resistance levels that can be projected into the future. This sets the Ichimoku Cloud apart from many other technical indicators that only provide support and resistance levels for the current date and time
Crossovers, also known as TK Cross among Ichimoku Cloud traders, are another way the indicator can be used. Watch for the Tenkan-Sen Line, or Conversion Line, to move above the Kijun-Sen Line, or Base Line, especially when price is above the Kumo cloud. This can be a powerful buy signal. One option is to hold the trade until the Tenkan-Sen drops back below the Kijun-Sen Line. Any of the other lines could be used as exit points as well.
With this study:
Allow Traders to use the Ichimoku Cloud in conjunction with other technical indicators to maximize their risk-adjusted returns
The Ichimoku Cloud can make a chart look busy with all the lines. To Remedy this a different approach is applied in this study showing the Price and the Kumo Cloud relation as well as TK Crosses displayed. The SuperTrend Indicator is chosen to display Ichimoku Indicator, where the SuperTrend is another trend following indicator.
How it works:
SuperTrend Line is colored as:
Green when the Price is above the Kumo Cloud
Red when the Price is below the Kumo Cloud
Black when the Price is within the Kumo Cloud
And Finally Blue when the Kumo Cloud Is not ready to be drawn or not Kumo Cloud available
Additionally intensity of the colors used in all cases above are defined by values of Tenkan-Sen and Kijun-Sen Line, which allows us to detect TK Crosses
2- Plots Colored Directional Movement Line
Definition
Directional Movement (DMI) (created by J. Welles Wilder ) is actually a collection of three separate indicators combined into one. Directional Movement consists of the Average Directional Index (ADX) , Plus Directional Indicator (+D I) and Minus Directional Indicator (-D I) . ADX's purposes is to define whether or not there is a trend present. It does not take direction into account at all. The other two indicators (+DI and -DI) are used to compliment the ADX. They serve the purpose of determining trend direction. By combining all three, a technical analyst has a way of determining and measuring a trend's strength as well as its direction.
This study combines all three lines in a single colored shapes series plotted on the top of the price chart indicating the trend strength with different colors and its direction with triangle up and down shapes.
What to look for
Trend Strength : Analyzing trend strength is the most basic use for the DMI. Wilder believed that a DMI reading above 25 indicated a strong trend, while a reading below 20 indicated a weak or non-existent trend
Crosses : DI Crossovers are the significant trading signal generated by the DMI
With this study
A Strong Trend is assumed when ADX >= 25
Bullish Trend is defined as (+D I > -DI ) and (ADX >= 25), which is plotted as green triangle up shape on top of the price chart
Bearish Trend is defined as (+D I < -DI ) and (ADX >= 25), which is plotted as red triangle down shape on top of the price chart
Week Trend is assumed when 17< ADX < 25, which is plotted as black triangles up or down shape, depending on +DI-DI values, on top of the price chart
Non-Existent Trend is assumed when ADX < 17, which is plotted as yellow triangles up or down shape, depending on +DI-DI values, on top of the price chart
Additionally intensity of the colors used in all cases above are defined by comparing ADX’s current value with its previous value
3- Volume Based Colored Bars indicator created by Kıvaç ÖZBİLGİÇ
Volume Based Colored Bars colors the bars into volume weighted signals increasing the visibility of the Volume changes. Intensity of the colors of the bars varies according to average value of the volume for given length of bars (default value set to 30 bars)
Disclaimer: The script is for informational and educational purposes only. Use of the script does not constitutes professional and/or financial advice. You alone the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd tradingview user liable for any possible claim for damages arising from any decision you make based on use of the script
Storm Trading System This script is inspired by the following :
Fractal Dow RSI Support and Resistance ;
Moving Average Clouds ;
Let's start.
This command is based on a fun description of where we are.
Technical analysis methods are likened to a storm.
Clouds as moving average,risk factor as lightning,
fractals were taken as green and red rain.
In this system:
4 Exponential Moving Averages, ( EMA15, EMA30 , EMA45 , EMA60 ),
interpretation of my own work, Dow Factor RSI, as Fractal Support and Resistance,
interpretation of my own work , DVOG Risk Factor : with changeable background and bar color.
Fractal support resistance level codes do not belong to me.
So I'm not putting a license.
But the other codes are my labor.
Consider the risk factor not as a stop, but as a region of high attention.
It is a warning before hard movements.
And watch out for turbulence in the clouds :)
The regions above and below the clouds are major trend zones, which may take a long time.
Guide the fractals in these areas.
It allows you to comment on this and tons of similar things.
And you see where you are in the big trade from a different perspective.
Repaint issue :
Firstly our source is close . Repaint will only cause the following issue and solution:
There may be a time difference between countries as the dow factor depends on the indexes.
Do not use a low graph time frame in stocks.
Volume Profile Free Pro (25 Levels Value Area VWAP) by RRBVolume Profile Free Pro by RagingRocketBull 2019
Version 1.0
All available Volume Profile Free Pro versions are listed below (They are very similar and I don't want to publish them as separate indicators):
ver 1.0: style columns implementation
ver 2.0: style histogram implementation
ver 3.0: style line implementation
This indicator calculates Volume Profile for a given range and shows it as a histogram consisting of 25 horizontal bars.
It can also show Point of Control (POC), Developing POC, Value Area/VWAP StdDev High/Low as dynamically moving levels.
Free accounts can't access Standard TradingView Volume Profile, hence this indicator.
There are 3 basic methods to calculate the Value Area for a session.
- original method developed by Steidlmayr (calculated around POC)
- classical method using StdDev (calculated around the mean VWAP)
- another method based on the mean absolute deviation (calculated around the median)
POC is a high volume node and can be used as support/resistance. But when far from the day's average price it may not be as good a trend filter as the other methods.
The 80% Rule: When the market opens above/below the Value Area and then returns/stays back inside for 2 consecutive 30min periods it has 80% chance of filling VA (like a gap).
There are several versions: Free, Free Pro, Free MAX. This is the Free Pro version. The Differences are listed below:
- Free: 30 levels, Buy/Sell/Total Volume Profile views, POC
- Free Pro: 25 levels, +Developing POC, Value Area/VWAP High/Low Levels, Above/Below Area Dimming
- Free MAX: 50 levels, packed to the limit
Features:
- Volume Profile with up to 25 levels (3 implementations)
- POC, Developing POC Levels
- Buy/Sell/Total/Side by Side View modes
- Side Cover
- Value Area, VAH/VAL dynamic levels
- VWAP High/Low dynamic levels with Source, Length, StdDev as params
- Show/Hide all levels
- Dim Non Value Area Zones
- Custom Range with Highlighting
- 3 Anchor points for Volume Profile
- Flip Levels Horizontally
- Adjustable width, offset and spacing of levels
- Custom Color for POC/VA/VWAP levels and Transparency for buy/sell levels
Usage:
- specify max_level/min_level for a range (required in ver 1.0/2.0, auto/optional in ver 3.0 = set to highest/lowest)
- select range (start_bar, range length), confirm with range highlighting
- select mode Value Area or VWAP to show corresponding levels.
- flip/select anchor point to position the buy/sell levels, adjust width and spacing as needed
- select Buy/Sell/Total/Side by Side view mode
- use POC/Developing POC/VA/VWAP High/Low as S/R levels. Usually daily values from 1-3 days back are used as levels for the current day.
- Green - buy volume of a specific price level in a range, Red - sell volume. Green + Red = Total volume of a price level in a range
There's no native support for vertical histograms in Pinescript (with price axis as base)
Basically, there are 4 ways to plot a series of horizontal bars stacked on top of each other:
1. plotshape style labeldown (ver 0 prototype discarded)
- you can have a set of fixed width/height text labels consisting of a series of underscores and moving dynamically as levels. Level offset controls visible length.
- you can move levels and scale the base width of the volume profile histogram dynamically
- you can calculate the highest/lowest range values automatically. max_level/min_level inputs are optional
- you can't fill the gaps between levels/adjust/extend width, height - this results in a half baked volume profile and looks ugly
- fixed text level height doesn't adjust and looks bad on a log scale
- fixed font width also doesn't scale and can't be properly aligned with bars when zooming
2. plot style columns + hist_base (ver 1.0)
- you can plot long horizontal bars using a series of small adjacent vertical columns with level offsets controlling visible length.
- you can't hide/move levels of the volume profile histogram dynamically on each bar, they must be plotted at all times regardless - you can't delete the history of a plot.
- you can't scale the base width of the volume profile histogram dynamically, can't set show_last from input, must use a preset fixed width for each level
- hist_base can only be a static const expression, can't be assigned highest/lowest range values automatically - you have to specify max_level/min_level manually from input
- you can't control spacing between columns - there's an equalizer bar effect when you zoom in, and solid bars when you zoom out
- using hist_base for levels results in ugly load/redraw times - give it 3-5 sec to finalize its shape after each UI param change
- level top can be properly aligned with another level's bottom producing a clean good looking histogram
- columns are properly aligned with bars automatically
3. plot style histogram + hist_base (ver 2.0)
- you can plot long horizontal bars using a series of small vertical bars (horizontal histogram) instead of columns.
- you can control the width of each histogram bar comprising a level (spacing/horiz density). Large enough width will cause bar overlapping and give level a "solid" look regardless of zoom
- you can only set width <= 4 in UI Style - custom textbox input is provided for larger values. You can set width and plot transparency from input
- this method still uses hist_base and inherits other limitations of ver 2.0
4. plot style lines (ver 3.0)
- you can also plot long horizontal bars using lines with level offsets controlling visible length.
- lines don't need hist_base - fast and smooth redraw times
- you can calculate the highest/lowest range values automatically. max_level/min_level inputs are optional
- level top can't be properly aligned with another level's bottom and have a proper spacing because line width uses its own units and doesn't scale
- fixed line width of a level (vertical thickness) doesn't scale and looks bad on log (level overlapping)
- you can only set width <= 4 in UI Style, a custom textbox input is provided for larger values. You can set width and plot transparency from input
Notes:
- hist_base for levels results in ugly load/redraw times - give it 3-5 sec to finalize its shape after each UI param change
- indicator is slow on TFs with long history 10000+ bars
- Volume Profile/Value Area are calculated for a given range and updated on each bar. Each level has a fixed width. Offsets control visible level parts. Side Cover hides the invisible parts.
- Custom Color for POC/VA/VWAP levels - UI Style color/transparency can only change shape's color and doesn't affect textcolor, hence this additional option
- Custom Widh for levels - UI Style supports only width <= 4, hence this additional option
- POC is visible in both modes. In VWAP mode Developing POC becomes VWAP, VA High and Low => VWAP High and Low correspondingly to minimize the number of plot outputs
- You can't change buy/sell level colors (only plot transparency) - this requires 2x plot outputs exceeding max 64 limit. That's why 2 additional plots are used to dim the non Value Area zones
- Use Side by Side view to compare buy and sell volumes between each other: base width = max(total_buy_vol, total_sell_vol)
- All buy/sell volume lengths are calculated as % of a fixed base width = 100 bars (100%). You can't set show_last from input
- Sell Offset is calculated relative to Buy Offset to stack/extend sell on top of buy. Buy Offset = Zero - Buy Length. Sell Offset = Buy Offset - Sell Length = Zero - Buy Length - Sell Length
- If you see "loop too long error" - change some values in UI and it will recalculate - no need to refresh the chart
- There's no such thing as buy/sell volume, there's just volume, but for the purposes of the Volume Profile method, assume: bull candle = buy volume, bear candle = sell volume
- Volume Profile Range is limited to 5000 bars for free accounts
P.S. Cantaloupia Will be Free!
Links on Volume Profile and Value Area calculation and usage:
www.tradingview.com
stockcharts.com
onlinelibrary.wiley.com
Support & Resistance LevelsBasic Visualisation of key support and resistance levels.
This script works best on periods of 15minutes or greater.
The strength of the support/resistance are shown through line thickness, and support levels are shown as green and resistance levels red.
Indicator: Relative Volume Indicator & Freedom Of MovementRelative Volume Indicator
------------------------------
RVI is a support-resistance technical indicator developed by Melvin E. Dickover. Unlike many conventional support and resistance indicators, the Relative Volume Indicator takes into account price-volume behavior in order to detect the supply and demand pools. These pools are marked by "Defended Price Lines" (DPLs), also introduced by the author.
RVI is usually plotted as a histogram; its bars are highlighted (black, by default) when the volume is unusually large. According to the author, this happens if the indicator value exceeds 2.0, thus signifying that a possible DPL is present.
DPLs are horizontal lines that run across the chart at levels defined by following conditions:
* Overlapping bars: If the indicator spike (i.e., indicator is above 2.0 or a custom value)
corresponds to a price bar overlapping the previous one, the previous close can be used as the
DPL value.
* Very large bars: If the indicator spike corresponds to a price bar of a large size, use its
close price as the DPL value.
* Gapping bars: If the indicator spike corresponds to a price bar gapping from the previous bar,
the DPL value will depend on the gap size. Small gaps can be ignored: the author suggests using
the previous close as the DPL value. When the gap is big, the close of the latter bar is used
instead.
* Clustering spikes: If the indicator spikes come in clusters, use the extreme close or open
price of the bar corresponding to the last or next to last spike in cluster.
DPLs can be used as support and resistance levels. In order confirm and refine them, RVI is used along with the FreedomOfMovement indicator discussed next.
Freedom of Movement Indicator
------------------------------
FOM is a support-resistance technical indicator, also by Melvin E. Dickover. FOM is the ratio of relative effect (relative price change) to the relative effort (normalized volume), expressed in standard deviations. This value is plotted as a histogram; its bars are highlighted (black, by default( when this ratio is unusually high. These highlighted bars, or "spikes", define the positioning of the DPLs.
Suggestions for placing DPLs are the same as for the Relative Volume Indicator discussed above.
Note that clustering spikes provide the strongest DPLs while isolated spikes can be used to confirm and refine those provided by the Relative Volume Indicator. Coincidence of spikes of the two indicator can be considered a sign of greater strength of the DPL.
More info:
S&C magazine, April 2014.
I am still trying these on various instruments to understand the workings more. Don't forget to share what you learn -- any use cases / ideal scenarios / gotchas, would love to hear them all.
Hourly Trend Open LineTradingView Indicator Publishing Prompt
Indicator Name: Hourly Trend Open Line
Short Title: HRLY OPEN
Type: Indicator
Source Code Language: Pine Script v6
Description and Key Features
Title: The Simplest Trend Filter: Hourly Trend Open Line (HRLY OPEN) 📈📉
Body:
Are you tired of complex indicators that clutter your chart? The Hourly Trend Open Line is a minimalist, powerful tool designed for traders who prioritize clean charts and high-timeframe trend conviction.
This indicator cuts through the noise by displaying the Open Price of the selected Trend Timeframe (defaults to the 1-Hour / 60-Minute chart) directly on your current chart.
Key Features:
High-Timeframe Trend Filter: Immediately identifies the direction of the dominant trend by comparing the current price to the open of the selected higher timeframe candle.
Visual Bias (Background Coloring):
Bullish Trend (Green Background): Current price is above the Trend Open Line.
Bearish Trend (Red Background): Current price is below the Trend Open Line.
Dynamic Reference Point: The Trend Open Line acts as a powerful mean-reversion level, serving as a dynamic support/resistance zone for lower timeframe entries.
Full Customization: Easily change the Trend Timeframe (e.g., to 4H, Daily, or 30m) and customize all colors for the line and the background zones.
How to Use It:
For Trend Following: Only look for Long entries when the background is Green (price above the line) and Short entries when the background is Red (price below the line).
For Mean Reversion: Use the Trend Open Line as a potential target or bounce zone. A retracement back to the line offers a potential continuation trade entry.
Keep your analysis focused and your decision-making fast. Add the Hourly Trend Open Line to your chart today!
TradingView Settings
Category: Trend / Trend Following
Style: Simple
Tags: trend-filter, hourly-open, open-price, support-resistance, mean-reversion, high-timeframe
Visibility: Public
🎨 Recommended Diagram Trigger
You should also include a clear visual demonstrating its function.
Hourly Trend Open LineHere is a detailed, ready-to-use prompt for publishing your final simplified indicator, the **"Hourly Trend Open Line,"** on TradingView.
## 🚀 TradingView Indicator Publishing Prompt
**Indicator Name:** Hourly Trend Open Line
**Short Title:** HRLY OPEN
**Type:** Indicator
**Source Code Language:** Pine Script v6
---
### Description and Key Features
**Title:** **The Simplest Trend Filter: Hourly Trend Open Line (HRLY OPEN)** 📈📉
**Body:**
Are you tired of complex indicators that clutter your chart? The **Hourly Trend Open Line** is a minimalist, powerful tool designed for traders who prioritize **clean charts** and **high-timeframe trend conviction**.
This indicator cuts through the noise by displaying the **Open Price** of the selected Trend Timeframe (defaults to the 1-Hour / 60-Minute chart) directly on your current chart.
#### Key Features:
1. **High-Timeframe Trend Filter:** Immediately identifies the direction of the dominant trend by comparing the current price to the open of the selected higher timeframe candle.
2. **Visual Bias (Background Coloring):**
* **Bullish Trend (Green Background):** Current price is **above** the Trend Open Line.
* **Bearish Trend (Red Background):** Current price is **below** the Trend Open Line.
3. **Dynamic Reference Point:** The Trend Open Line acts as a powerful mean-reversion level, serving as a dynamic support/resistance zone for lower timeframe entries.
4. **Full Customization:** Easily change the Trend Timeframe (e.g., to 4H, Daily, or 30m) and customize all colors for the line and the background zones.
#### How to Use It:
* **For Trend Following:** Only look for **Long entries** when the background is **Green** (price above the line) and **Short entries** when the background is **Red** (price below the line).
* **For Mean Reversion:** Use the Trend Open Line as a potential target or bounce zone. A retracement back to the line offers a potential continuation trade entry.
**Keep your analysis focused and your decision-making fast. Add the Hourly Trend Open Line to your chart today!**
---
### TradingView Settings
**Category:** Trend / Trend Following
**Style:** Simple
**Tags:** `trend-filter`, `hourly-open`, `open-price`, `support-resistance`, `mean-reversion`, `high-timeframe`
**Visibility:** Public
---
### 🎨 Recommended Diagram Trigger
You should also include a clear visual demonstrating its function.
****
DAILY AND WEEKLY MID LINESDAILY AND WEEKLY MID LINES INDICATOR
Description:
This indicator calculates and visualizes the dynamic midpoint (mid) of the current day and week in real-time. It provides traders with key reference levels based on developing price action.
Features:
Daily Mid Line:
Color: Orange
Thickness: 3 pixels
Style: Solid line
Updates: Automatically recalculates with each new candle
Calculation: Average of the day's highest high and lowest low from market open
Weekly Mid Line:
Color: Blue
Thickness: 3 pixels
Style: Dashed line
Updates: Continuously recalculates throughout the week
Calculation: Average of the week's highest high and lowest low from week start
How It Works:
At the start of each new trading day (00:00), the daily mid line resets and begins calculating from the first candle
At the start of each new trading week (typically Monday), the weekly mid line resets and begins fresh calculations
Both lines extend automatically to the right as new candles form
The lines are dynamic - they adjust as new highs/lows are made during the day/week
Trading Applications:
Support/Resistance Levels:
The mid lines act as natural equilibrium points where price may find temporary support or resistance
Daily mid can serve as intraday pivot, weekly mid as broader market balance point
Trend Analysis:
Price consistently above mid lines suggests bullish momentum
Price consistently below mid lines suggests bearish momentum
Relationship between daily and weekly mid lines shows multi-timeframe alignment
Entry/Exit Signals:
Price crossing above daily mid may indicate short-term bullish momentum
Price crossing below daily mid may indicate short-term bearish momentum
Weekly mid breaks can signal more significant trend changes
Market Context:
Distance between price and mid lines indicates market extremity
Steeper mid line slopes suggest stronger directional momentum
Flat mid lines suggest range-bound or consolidating markets
Confluence Trading:
Combine with other indicators (RSI, MACD, moving averages) for confirmation
Use as dynamic levels for stop-loss placement or take-profit targets
Best Practices:
More effective on higher timeframes (1H, 4H, Daily) for clearer signals
Works well in trending markets where mid lines act as moving support/resistance
Monitor for price rejection or acceptance at mid levels for trading decisions
Use in conjunction with volume analysis for confirmation
Psychological Significance:
Mid points often represent fair value areas where buyers and sellers find temporary equilibrium, making them natural decision points for market participants.
This indicator is particularly useful for day traders, swing traders, and position traders looking for dynamic, real-time reference points that adapt to current market conditions rather than relying on static historical levels.
🟡 GOLD 4H HUD v8.9 — Loose ICT OB + Strong/Weak + FVG/HVN/LVNGOLD 4H HUD v8.9 is a clean, structured Smart Money Concepts (SMC)–based analysis tool designed exclusively for XAUUSD on the 4-hour timeframe.
It focuses on the three most important elements for institutional orderflow analysis:
✔ Loose ICT Order Blocks (Demand/Supply)
✔ Fair Value Gaps (FVG)
✔ Volume Profile Zones (HVN/LVN/POC)
The script builds a professional-style HUD that displays the key institutional regions and structural levels that matter most for gold traders.
📌 Key Features
1 — Market Structure Engine (HH/HL & BOS)
The indicator detects:
Minor swing Highs and Lows
Last confirmed HH / HL levels
Break of Structure (BOS) for directional bias
EMA-200 trend filter (UP / DOWN / NEUTRAL)
This gives traders a clean structural read without clutter or noise.
2 — Loose FVG Engine (Tolerance-Based ICT Gaps)
A soft-threshold FVG engine detects “loose” Fair Value Gaps using a 0.1% price tolerance.
This method ensures:
Fewer missed imbalances
Cleaner OB/FVG alignment
Higher accuracy on 4H gold displacement legs
FVGs automatically shift to the right side of the chart for clean visualization.
3 — Order Block Engine (Demand/Supply + Strong/Weak Classification)
A simplified ICT-style OB engine scans the past few candles whenever BOS is detected.
It identifies:
Demand OB during bullish BOS
Supply OB during bearish BOS
Strong OB if fully nested inside an active FVG
Weak OB otherwise
OB boxes include:
Clear color coding (strong vs. weak)
Price range labels inside each box
Automatic right-shift for visual clarity
4 — Volume Profile Engine (POC / HVN / LVN / VAH / VAL)
Based on a rolling window (default 120 bars), the script builds a lightweight volume distribution.
It displays:
POC (Point of Control)
HVN (High Volume Node)
LVN (Low Volume Node)
Value Area High / Low
HVN/LVN zones are shown as right-shifted colored boxes with price labels.
These zones help identify:
Institutional accumulation
Low-liquidity rejection points
Areas where price tends to react strongly
5 — Support / Resistance Mapping
The script automatically generates:
OB-based support/resistance
Swing-high/swing-low levels
HVN/LVN structural levels
These are displayed in the HUD for fast reference.
6 — Professional HUD Panel
A compact, easy-to-read HUD summarizes:
Trend direction
Latest HH/HL
OB ranges (Strong/Weak)
HVN/LVN price zones
POC
Multi-layer support & resistance
This turns the script into a fully functional analysis dashboard.
📌 What This Indicator Is NOT
To avoid misunderstanding:
It does not take entries or generate buy/sell signals
It does not auto-detect CHOCH, MSS, SMT, or sweeps
It is not a trading bot
This tool is designed as an institutional-style map and analysis HUD, not a strategy.
📌 Best Use Case
This indicator is ideal for traders who want to:
Read institutional structure on XAUUSD
Identify clean Demand/Supply zones
Visualize FVG/OB/HVN interactions
Track high-value liquidity levels
Build directional bias on 4H before dropping to execution timeframes
⚠ Important Note
This tool is designed exclusively for the 4H timeframe.
Using it on lower timeframes will display a warning.
Quantum Uncertainty by Kingshuk GhoshLet me explain this indicator in simple, practical terms, including the fascinating physics concept that inspired me.
This indicator helps to understand when the market is predictable (safe to trade) versus unpredictable (risky to trade). It shows the probability zones where price is likely to move and warns you when conditions are too chaotic for reliable trading.
The Physics Behind It: Heisenberg's Uncertainty Principle:-
This indicator is inspired by one of the most profound discoveries in physics: Heisenberg's Uncertainty Principle.
What Is The Uncertainty Principle?
In 1927, physicist Werner Heisenberg discovered something remarkable about the universe: you cannot simultaneously know both the exact position and exact momentum of a particle with perfect precision. The more accurately you know one, the less accurately you can know the other.
Simple Analogy:
Imagine trying to photograph a speeding bullet:
Use fast shutter speed → You see exactly WHERE it is (position), but the image is frozen, so you can't tell HOW FAST it's moving (momentum)
Use slow shutter speed → You see motion blur showing HOW FAST it's moving (momentum), but you can't pinpoint exactly WHERE it is (position)
You can never have both perfect clarity simultaneously - there's always a trade-off.
How This Applies To Trading
The indicator translates this principle to financial markets:
In Physics:
Position Uncertainty × Momentum Uncertainty = Always greater than a minimum value
High uncertainty in one means high uncertainty overall
In Trading:
Price Position Uncertainty = How much the price bounces around (volatility)
Price Momentum Uncertainty = How erratic the directional strength is
Total Market Uncertainty = Price Volatility × Momentum Volatility
The Trading Insight:
Just like in physics, when BOTH price position and momentum are uncertain (highly volatile), the market becomes fundamentally unpredictable. You can't reliably know where price will go next because the system is in high uncertainty state.
Why This Matters For You
Traditional indicators often look at price OR momentum separately. This indicator recognizes that both must be considered together to truly understand market predictability, just as Heisenberg showed that position and momentum must be considered together in physics.
When both uncertainties are high simultaneously:
Price could jump anywhere
Momentum could shift instantly
Predictions become unreliable
Trading becomes gambling
When both uncertainties are low:
Price behavior is more regular
Momentum is more stable
Patterns become clearer
Trading becomes strategic
This is why the indicator's core metric multiplies price volatility by momentum volatility - it's capturing that fundamental uncertainty relationship.
Market Uncertainty
The indicator calculates how unpredictable the market currently is by examining:
How much price is bouncing around (price volatility)
How erratic the momentum is (momentum instability)
When both are high simultaneously, the market becomes highly unpredictable. When both are calm, the market is more reliable for trading.
Think of it like driving:
Low uncertainty = Clear road, good visibility, safe to drive
High uncertainty = Fog, rain, poor visibility, dangerous conditions
Probability Bands
The indicator draws colored bands around a central average price line:
White Center Line (Basis)
The average price over your lookback period
Acts as a equilibrium point where price gravitates
Blue Bands (Inner Zone)
Covers about 68% of normal price behavior
Price spends most of its time here
This is the "normal operating range"
Purple Bands (Outer Zone)
Covers about 95% of all price behavior
Price rarely ventures here
When it does, it's unusual and noteworthy
Highway Lane Analogy:
Most drivers stay in center lanes (blue zone)
Few drivers use extreme outer lanes (purple zone)
When someone drives on the shoulder, it's abnormal and signals something is happening
Wave Function Collapse
Another physics concept applied here: In quantum mechanics, particles exist in multiple states simultaneously (superposition) until they're measured - then the "wave function collapses" to a single state.
In This Indicator:
The probability bands represent all the possible states price could be in. When price moves and settles at a specific level, it's like the wave function collapsing - probability becomes reality.
The indicator helps you see:
Where price is most likely to be (high probability zones - blue bands)
Where price rarely goes (low probability zones - purple bands)
When price is in an "impossible" state (outside bands - tunneling)
Price Position
The indicator tracks where current price sits within these bands:
Upper position = Price in the top half (bullish territory)
Lower position = Price in the bottom half (bearish territory)
Extreme positions = Price in outer 30% on either side (potential reversal zones)
Quantum Tunneling Signals
This is another physics concept: In quantum mechanics, particles can sometimes "tunnel" through barriers that classical physics says they shouldn't be able to cross.
In Trading:
When price breaks through the 95% probability barrier, it's "tunneling" into statistically improbable territory - these are marked by triangles:
Green Triangle Up
Price tunneled through the upper 95% barrier
This is statistically rare (happens only 5% of the time)
Often signals price exhaustion or coming reversal downward
Like a particle that tunneled too far and will snap back
Red Triangle Down
Price tunneled through the lower 95% barrier
Also statistically unusual
Often signals panic selling may be overdone
Like a spring compressed too far, ready to bounce
These "tunneling events" are significant because they represent extreme deviations from normal probability - and markets tend to revert to normal.
Entanglement Score
In quantum physics, "entanglement" means two particles are connected such that measuring one instantly affects the other, no matter the distance.
In Trading:
This measures whether price movements are "entangled" with trading volume - do they move together in a connected way?
High Entanglement (above 0.5)
Price and volume move together
Volume confirms the price action
More reliable, trustworthy moves
Like entangled particles - they're truly connected
Low Entanglement (below 0.3)
Price moves without volume support
Suspicious, unsupported movements
Less reliable, be cautious
Like particles that aren't entangled - the connection is weak
Negative Entanglement
Price and volume move in opposite directions
Often signals divergence or potential reversal
Requires careful interpretation
Information Dashboard:
1. Uncertainty Level
Shows current market unpredictability (the core Heisenberg principle calculation):
✓ Normal (Green) = Market is behaving predictably, safe to trade
⚠ High Risk (Red) = Market is chaotic, avoid trading
This is your first checkpoint - if uncertainty is high, don't proceed further.
2. Probability Score
Shows how normal or extreme the current price is:
Percentage shown = Where price sits in the probability distribution
✓ Safe (Green) = Price in normal range (middle 70%)
⛔ Extreme (Red) = Price at statistical outliers (outer 15%)
High percentage (>85%) = Price near the average, stable situation
Low percentage (<15%) = Price at extremes, unstable situation
3. Position Indicator
Tells you which side of the market you're on:
Upper/Lower = Basic location in the bands
→ Neutral (Gray) = Price in balanced middle zone
⚠ Reversal? (Orange) = Price at extremes, watch for turnaround
This helps you anticipate potential support or resistance levels.
4. Entanglement Confirmation
Shows the correlation number and interpretation:
✓ Confirmed (Green) = Volume strongly supports price (>0.5)
⚠ Weak (Orange) = Poor volume support (<0.5)
Always prefer trading when entanglement is confirmed - it means the move is "real" with participant backing.
5. Trade Status - YOUR MAIN SIGNAL
This is the indicator's final verdict combining all factors:
✓ TRADEABLE (Green)
Uncertainty is normal
Probability is safe
Entanglement is decent
Action: Market conditions favor trading
⛔ AVOID (Red)
One or more conditions are unfavorable
Market is too unpredictable
Action: Stay out, preserve capital.
Scenario A: Perfect Buy Setup
Red triangle appears (quantum tunneling down)
Position shows "Lower" with "⚠ Reversal?" warning
Entanglement shows "✓ Confirmed"
Trade Status: "✓ TRADEABLE"
Interpretation: Price hit extreme low with volume support, likely to bounce back to probability zone
Action: Consider long entry with stop below recent low
Scenario B: Perfect Sell Setup
Green triangle appears (quantum tunneling up)
Position shows "Upper" with "⚠ Reversal?" warning
Entanglement shows "✓ Confirmed"
Trade Status: "✓ TRADEABLE"
Interpretation: Price hit extreme high, exhaustion in high uncertainty zone
Action: Consider short entry or exit longs with stop above recent high
Scenario C: High Uncertainty - Stay Out
Uncertainty shows "⚠ High Risk"
Probability shows "⛔ Extreme"
Trade Status: "⛔ AVOID"
Interpretation: Both price and momentum uncertainties are high - market is fundamentally unpredictable (Heisenberg principle in action)
Action: No trading, wait for uncertainty to decrease
Scenario D: Trending Market
Price consistently stays in upper bands
No tunneling signals
Entanglement remains high
Trade Status stays "✓ TRADEABLE"
Interpretation: Strong trend with low uncertainty
Action: Trade with the trend, don't fight it
Scenario E: Choppy, Range-Bound
Price bounces between inner blue bands
Frequent status changes between TRADEABLE and AVOID
Entanglement fluctuates
Interpretation: Market lacks direction, uncertainty fluctuating
Action: Use bands as support/resistance for scalping, or wait for breakout.
Why The Uncertainty Principle Matters In Trading
Traditional technical analysis often looks at indicators in isolation:
"RSI is oversold, so buy"
"Price is volatile, so wait"
"Volume is high, so trade"
But Heisenberg's principle teaches us that multiple uncertainties interact and compound. This indicator recognizes that truth:
When price volatility is high AND momentum is erratic:
You can't reliably predict where price will go
You can't reliably predict how strong the move will be
The combination creates fundamental unpredictability
This is when the indicator says "AVOID"
When price volatility is low AND momentum is stable:
Price behavior becomes more regular
Directional moves become more reliable
The low combined uncertainty creates tradeable conditions
This is when the indicator says "TRADEABLE"
The Probability Wave Function
In quantum mechanics, until you measure a particle, it exists in all possible states simultaneously (superposition). The probability wave describes where it's most likely to be found.
The bands work the same way:
Blue bands = Where price has 68% probability of being (1 standard deviation)
Purple bands = Where price has 95% probability of being (2 standard deviations)
Outside bands = Less than 5% probability (quantum tunneling territory)
When price is in the blue zone, it's in its "natural" superposition state - normal behavior.
When price tunnels outside, it's in an "improbable" state - like a quantum particle appearing where it shouldn't be. Physics tells us this can't last - the wave function will collapse back to normal probability zones. In trading, this means reversion to the mean.
Entanglement and Market Correlation
Quantum entanglement shows us that connections matter - particles don't act in isolation.
In markets:
Price shouldn't move in isolation from volume
When they're "entangled" (moving together), the move is authentic
When they're not entangled (price moves without volume), the move is suspicious
This is why the indicator checks entanglement - it's verifying that the market components are properly connected and confirming each other.
Golden Rules for the indicator:
Never trade during high uncertainty states - When the indicator shows AVOID, it's telling you that fundamental unpredictability (Heisenberg's principle) has taken over. This is non-negotiable.
Reduce position size when entanglement is weak - Even if uncertainty is low, weak volume entanglement means the move may not be authentic.
Respect the quantum tunneling signals - They mark statistical extremes where price has entered improbable territory. Reversion to normal probability zones is likely.
Don't chase price outside the bands - If you missed the tunneling entry, wait for price to return to normal probability zones.
Use the white center line as equilibrium - Like particles gravitating toward lower energy states, price tends to revert to its average.
Heisenberg's Uncertainty Principle teaches us a profound lesson: some things are fundamentally unknowable. You cannot eliminate uncertainty - you can only measure it and decide whether it's low enough to act.
This indicator embraces that wisdom:
It doesn't claim to predict the future
It doesn't promise guaranteed wins
It simply measures current uncertainty
And tells you when conditions are favorable vs. unfavorable
The market, like quantum particles, is probabilistic, not deterministic. You're trading probabilities, not certainties. The indicator helps you identify when those probabilities are in your favor (low uncertainty) and when they're not (high uncertainty).
This is a more mature, realistic approach to trading than indicators that promise to "predict" moves. Instead, this indicator honestly assesses predictability itself.
Remember: Not trading during high uncertainty is just as important as trading during low uncertainty. Preservation of capital is the foundation of long-term success. As Heisenberg taught us, some moments are simply too uncertain to act - and that's okay.
Chart attached: -NSE Persistent, EoD 05/12/25, Day Time Frame.
DISCLAIMER: This information is provided for educational purposes only and should not be considered financial, investment, or trading advice. Please do boost if you like it. Happy Trading.
Volume Flow Anatomy [Kodexius]Volume Flow Anatomy is a dynamic, multi-dimensional volume map that reconstructs how buy, sell, and “stealth” activity is distributed across price rather than just across time. Instead of relying on a static, session-based volume profile, it uses an exponentially decaying memory of recent bars to build a constantly evolving “anatomy” of the auction, where each price level carries an adaptive history of order flow.
The script separates buy vs. sell pressure, adds a third “Stealth Flow” dimension for low-volume price movement (ease of movement / divergence), and automatically derives POC, Value Area, imbalances, absorption zones, and classic profile shapes (D, P, b, B). This gives the trader a compact but highly information-dense map on the right side of the chart to read control (buyers vs. sellers), structure (balanced vs. trending vs. double distribution), and key reaction levels (support/resistance born from flow, not just wicks).
🔹 Features
🔸 Dynamic Lookback with Decay
- The script computes an effective lookback N from the Decay Factor and caps it with Max Lookback.
- Higher decay keeps more history; lower decay emphasizes the most recent flow.
- The profile continuously adapts as new bars are printed.
🔸 Price-Bucketed Flow Map
Each bucket accumulates:
- Sell Flow (sell pressure)
- Buy Flow (buy pressure)
- Stealth Flow (low-volume price movement)
- Box width at each bucket is proportional to the relative intensity of that component.
🔸 Stealth Flow (Low-Volume Price Movement)
- Measures close to close movement relative to volume, emphasizing price movement that occurs on comparatively low volume.
- Helps reveal hidden participation, inefficient moves, and areas that may be vulnerable to re-tests or reversions.
🔸 POC & 70% Value Area (VA)
- Identifies the Point of Control (price bucket with the highest total volume) over the effective lookback.
- Builds a 70% Value Area by expanding from POC towards the nearest high volume neighbors until 70% of the total volume is included.
- POC is drawn as a line over the analyzed range; VA is displayed as a shaded band in the profile area.
🔸 Market Profile Shape Detection
Splits the profile vertically into three zones (bottom / middle / top) and compares their volume distribution.
Classifies structure as:
- D-Shape (Balanced)
- P-Shape (Short Covering)
- b-Shape (Long Liquidation)
- B-Shape (Double Distribution)
Displays a shape label with color coded bias for quick auction context interpretation.
🔸 Imbalance Zones & Absorption
Imbalance: detects buckets where Buy Flow or Sell Flow exceeds the opposite side by at least Imbalance Ratio.
Absorption: flags zones with high volume but low price “ease”, where price is not moving much despite significant volume.
Extends these levels into horizontal zones, marking potential support/resistance and trap areas.
Bullish Imbalance Zone :
Bearish Imbalance Zone :
Absorption Zone :
🔸 Range Context & On-Chart Legend
Draws a Range Box covering the dynamically determined lookback (N bars), with a label displaying the effective bar count.
A bottom-right legend summarizes:
- Color keys for Buy / Sell / Stealth
- POC / VA status
- Bullish vs. Bearish dominance percentage
- Profile shape classification
- Imbalance and Absorption conventions
🔹 Calculations
1. Dynamic Lookback & Price Buckets
int N = math.min(int(4 / (1 - decayFactor) - 1), maxHistory)
float priceHigh = ta.highest(high, N)
float priceLow = ta.lowest(low, N)
float bucketSize = (priceHigh - priceLow) / bucketCount
The effective lookback N is derived from the Decay Factor, using the approximation 4 / (1 - decay) to capture roughly 99% of the decayed influence, then capped with maxHistory to control performance. Over that adaptive range, the script finds the highest and lowest prices and divides the band into bucketCount equal slices (bucketSize). Each slice is a price bucket that will accumulate volume-flow information.
2. Exponentially Decayed Volume Allocation
addValue(array profile, float weight, float minPrice, float maxPrice) =>
for j = 0 to bucketCount - 1
float bucketMin = priceLow + j * bucketSize
float bucketMax = bucketMin + bucketSize
float overlapMin = math.max(minPrice, bucketMin)
float overlapMax = math.min(maxPrice, bucketMax)
float overlapRange = overlapMax - overlapMin
if overlapRange > 0
profile.set(j, profile.get(j) * decayFactor + weight * overlapRange)
This function is the core engine of the indicator. For a given price span and intensity, it checks every bucket for overlap, distributes the weight proportionally to the overlapping range, and before adding new value, decays the existing bucket content by decayFactor. This results in an exponentially weighted profile: recent activity dominates, while older levels retain a gradually fading footprint.
3. POC and 70% Value Area
array totalProfile = array.new(bucketCount, 0)
for j = 0 to bucketCount - 1
float total = sellProfile.get(j) + buyProfile.get(j)
totalProfile.set(j, total)
if total > eaMax
eaMax := total
int pocIdx = 0
float pocVal = 0.0
for j = 0 to bucketCount - 1
if totalProfile.get(j) > pocVal
pocVal := totalProfile.get(j)
pocIdx := j
float totalSum = totalProfile.sum()
float targetSum = totalSum * 0.70
int vaLow = pocIdx
int vaHigh = pocIdx
float currentSum = pocVal
while currentSum < targetSum and (vaLow > 0 or vaHigh < bucketCount - 1)
float lowVal = vaLow > 0 ? totalProfile.get(vaLow - 1) : 0.0
float highVal = vaHigh < bucketCount - 1 ? totalProfile.get(vaHigh + 1) : 0.0
First, totalProfile is built as the sum of buy and sell flow per bucket, and eaMax (the maximum total) is tracked for later normalization. The POC bucket (pocIdx) is simply the index with the highest totalProfile value.
To compute the 70% Value Area, the algorithm starts at the POC bucket and expands outward, each step adding either the upper or lower neighbor depending on which has more volume. This continues until the cumulative volume reaches 70% of totalSum. The result is a volume-driven VA, not necessarily symmetric around POC, which more accurately represents where the market has truly traded.
4. Market Profile Shape Classification
float volTopThird = 0.0
float volMidThird = 0.0
float volBotThird = 0.0
int thirdIdx = int(bucketCount / 3)
for j = 0 to bucketCount - 1
float val = totalProfile.get(j)
if j < thirdIdx
volBotThird += val
else if j < thirdIdx * 2
volMidThird += val
else
volTopThird += val
float totalVolShape = totalProfile.sum()
string shapeStr = "D-Shape (Balanced)"
if (volTopThird > totalVolShape * 0.20) and (volBotThird > totalVolShape * 0.20) and (volMidThird < totalVolShape * 0.50)
shapeStr := "B-Shape (Double Dist)"
else
if pocIdx > bucketCount * 0.5 and volTopThird > volBotThird * 1.3
shapeStr := "P-Shape (Short Covering)"
else if pocIdx < bucketCount * 0.5 and volBotThird > volTopThird * 1.3
shapeStr := "b-Shape (Long Liquidation)"
else
shapeStr := "D-Shape (Balanced)"
The profile is split into bottom, middle, and top thirds. The script compares how much volume is concentrated in each and combines that with the relative location of POC. If both extremes are heavy and the middle light, it labels a B-Shape (double distribution). If the POC is high and the top dominates the bottom, it’s a P-Shape (short covering). If the POC is low and the bottom dominates, it’s a b-Shape (long liquidation). Otherwise, it defaults to a D-Shape (balanced). This provides a quick, at-a-glance assessment of auction structure.
5. Imbalances, Absorption & Zones
bool isBuyImb = showImb and sVal > 0 and (bVal / sVal >= imbRatio)
bool isSellImb = showImb and bVal > 0 and (sVal / bVal >= imbRatio)
float volRatio = eaMax > 0 ? tVal / eaMax : 0
float stRatio = esmRange > 0 ? (stVal - esmMin) / esmRange : 1.0
bool isAbsorp = showAbsorp and volRatio > 0.6 and stRatio < 0.25
if showImbZone
if isSellImb
zoneBoxes.push(box.new(bar_index - N + 1, bucketHi, bar_index + 1, bucketLo, ...))
if isBuyImb
zoneBoxes.push(box.new(bar_index - N + 1, bucketHi, bar_index + 1, bucketLo, ...))
if isAbsorp
zoneBoxes.push(box.new(bar_index - N + 1, bucketHi, bar_index + 1, bucketLo, ...))
Imbalances are identified where one side’s volume (buy or sell) exceeds the other by at least Imbalance Ratio. These buckets are marked as buy or sell imbalance zones, indicating aggressive participation from one side.
Absorption is detected by combining a high volume ratio (volRatio) with a low normalized stealth ratio (stRatio). High volume with limited price movement suggests that opposing orders are absorbing flow at that level. Both imbalance and absorption buckets are extended into horizontal zones from the start of the lookback to the current bar, visually emphasizing key support/resistance and liquidity areas.
6. Building Buy, Sell & Stealth Profiles
sellProfile := array.new(bucketCount, 0)
buyProfile := array.new(bucketCount, 0)
stealthProfile := array.new(bucketCount, 0)
Three arrays are used to store Sell Flow, Buy Flow, and Stealth Flow. Bars are processed from oldest to newest so that decay is applied in correct chronological order. For each bar, a volume density (volume / range) is calculated and distributed across the candle range. Bull candles feed buyProfile, bear candles feed sellProfile.
Stealth Flow computes the close-to-close move between consecutive bars, scaled by 1 / (1 + volume). Big moves on low volume produce high stealth values, which are then allocated across the move’s price span into stealthProfile. This yields a three-layer profile per price level: directional volume and stealthy price movement.
ACCDv3# ACCDv3 - Accumulation/Distribution MACD with Divergence Detection
## Overview
**ACCDv3** (Accumulation/Distribution MACD Version 3) is an advanced volume-weighted momentum indicator that combines the Accumulation/Distribution (A/D) line with MACD methodology and divergence detection. It helps identify trend strength, momentum shifts, and potential reversals by analyzing volume-weighted price movements.
## Key Features
- **Volume-Weighted MACD**: Applies MACD calculation to volume-weighted A/D values for earlier, more reliable signals
- **Divergence Detection**: Identifies when A/D trend diverges from MACD momentum
- **Volume Strength Filtering**: Distinguishes high-volume confirmations from low-volume noise
- **Color-Coded Histogram**: 4-color system showing momentum direction and volume strength
- **Real-Time Alerts**: Background colors and alert conditions for bullish/bearish divergences
## Components
### 1. Accumulation/Distribution (A/D) Line
The A/D line measures buying and selling pressure by comparing the close price to the trading range, weighted by volume:
```
A/D = Σ ((2 × Close - Low - High) / (High - Low)) × Volume
```
- **Rising A/D**: More accumulation (buying pressure)
- **Falling A/D**: More distribution (selling pressure)
- **Doji Handling**: When High = Low, contribution is zero (avoids division errors)
### 2. Volume-Weighted MACD
Instead of simple EMAs, the indicator weights A/D values by volume:
- **Fast Line** (default 12): `EMA(A/D × Volume, 12) / EMA(Volume, 12)`
- **Slow Line** (default 26): `EMA(A/D × Volume, 26) / EMA(Volume, 26)`
- **MACD Line**: Fast Line - Slow Line (green line)
- **Signal Line** (default 9): EMA or SMA of MACD (orange line)
- **Histogram**: MACD - Signal (color-coded columns)
This volume-weighting ensures that periods with higher volume have greater influence on the indicator values.
### 3. Histogram Color System
The histogram uses 4 distinct colors based on **direction** and **volume strength**:
| Condition | Color | Meaning |
|-----------|-------|---------|
| Rising + High Volume | **Dark Green** (#1B5E20) | Strong bullish momentum with volume confirmation |
| Rising + Low Volume | **Light Teal** (#26A69A) | Bullish momentum but weak volume (less reliable) |
| Falling + High Volume | **Dark Red** (#B71C1C) | Strong bearish momentum with volume confirmation |
| Falling + Low Volume | **Light Red/Pink** (#FFCDD2) | Bearish momentum but weak volume (less reliable) |
Additional shading:
- **Light Cyan** (#B2DFDB): Positive but not rising (momentum stalling)
- **Bright Red** (#FF5252): Negative and accelerating down
### 4. Divergence Detection
Divergence occurs when A/D trend and MACD momentum move in opposite directions:
#### Bullish Divergence (Green Background)
- **Condition**: A/D is trending up BUT MACD is negative and trending down
- **Interpretation**: Accumulation increasing while momentum appears weak
- **Signal**: Potential bullish reversal or continuation
- **Action**: Look for entry opportunities or hold long positions
#### Bearish Divergence (Red Background)
- **Condition**: A/D is trending down BUT MACD is positive and trending up
- **Interpretation**: Distribution increasing while momentum appears strong
- **Signal**: Potential bearish reversal or weakening uptrend
- **Action**: Consider exits, tighten stops, or prepare for reversal
## Parameters
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| **Fast Length** | 12 | 1-50 | Period for fast EMA (shorter = more sensitive) |
| **Slow Length** | 26 | 1-100 | Period for slow EMA (longer = smoother) |
| **Signal Smoothing** | 9 | 1-50 | Period for signal line (MACD smoothing) |
| **Signal Line MA Type** | EMA | SMA/EMA | Moving average type for signal calculation |
| **Volume MA Length** | 20 | 5-100 | Period for volume average (strength filter) |
## Usage Guide
### Reading the Indicator
1. **MACD Lines (Green & Orange)**
- **Crossovers**: When green crosses above orange = bullish, below = bearish
- **Distance**: Wider gap = stronger momentum
- **Zero Line**: Above = bullish bias, below = bearish bias
2. **Histogram Colors**
- Focus on **dark colors** (dark green/red) for high-confidence signals
- Be cautious with **light colors** (teal/pink) - wait for volume confirmation
- Watch for **rising red bars** (V-bottom pattern) = potential bullish reversal
- Watch for **falling green bars** (Λ-top pattern) = potential bearish reversal
3. **Background Divergence Alerts**
- **Green background**: Bullish divergence - consider long entries
- **Red background**: Bearish divergence - consider exits or shorts
- Best used in combination with price action and support/resistance levels
### Trading Strategies
#### Trend Following
1. Wait for MACD to cross above zero line with dark green histogram
2. Enter long when histogram shows consecutive dark green bars
3. Exit when histogram turns light green or red appears
#### Divergence Trading
1. Wait for background divergence alert (green or red)
2. Confirm with price action (support/resistance, candlestick patterns)
3. Enter on next dark-colored histogram bar in divergence direction
4. Set stops beyond recent swing high/low
#### Volume Confirmation
1. Ignore signals during low-volume periods (light colors)
2. Take aggressive positions during high-volume confirmations (dark colors)
3. Use volume strength as position sizing guide (larger size on dark bars)
### Best Practices
✓ **Combine with price action**: Don't rely on indicator alone
✓ **Wait for dark colors**: High-volume bars are more reliable
✓ **Watch for divergences**: Early warning signs of reversals
✓ **Use multiple timeframes**: Confirm signals across 1m, 5m, 15m
✓ **Respect zero line**: Trading direction should align with MACD side
✗ **Don't chase light-colored signals**: Low volume = lower reliability
✗ **Don't ignore context**: Market structure and levels matter
✗ **Don't over-trade**: Wait for clear, high-volume setups
✗ **Don't ignore alerts**: Divergences are early warnings
## Technical Details
### Volume-Weighted Calculation Method
Traditional MACD uses simple price EMAs. ACCDv3 weights each A/D value by its corresponding volume:
```pine
// Volume-weighted fast EMA
close_vol_fast = ta.ema(ad × volume, fast_length)
vol_fast = ta.ema(volume, fast_length)
vw_ad_fast = close_vol_fast / vol_fast
// Same for slow EMA
close_vol_slow = ta.ema(ad × volume, slow_length)
vol_slow = ta.ema(volume, slow_length)
vw_ad_slow = close_vol_slow / vol_slow
// MACD is the difference
macd = vw_ad_fast - vw_ad_slow
```
This ensures high-volume periods have proportionally more impact on the indicator.
### Volume Strength Filter
Determines whether current volume is above or below average:
```pine
vol_avg = ta.sma(volume, vol_length)
vol_strength = volume > vol_avg
```
Used to select dark (high volume) vs light (low volume) histogram colors.
### Divergence Logic
```pine
// A/D trending up if above its 5-period SMA
ad_trend = ad > ta.sma(ad, 5)
// MACD trending up if above zero
macd_trend = macd > 0
// Divergence when trends oppose
divergence = ad_trend != macd_trend
// Specific conditions
bullish_divergence = ad_trend and not macd_trend and macd < 0
bearish_divergence = not ad_trend and macd_trend and macd > 0
```
## Alerts
The indicator includes built-in alert conditions:
- **Bullish Divergence**: "Bullish Divergence: A/D trending up but MACD trending down"
- **Bearish Divergence**: "Bearish Divergence: A/D trending down but MACD trending up"
To enable:
1. Click "Create Alert" button in TradingView
2. Select "ACCDv3" as condition
3. Choose "Bullish Divergence" or "Bearish Divergence"
4. Configure notification method (popup, email, webhook, etc.)
## Comparison with Standard MACD
| Feature | Standard MACD | ACCDv3 |
|---------|---------------|---------|
| **Input** | Close price | Accumulation/Distribution line |
| **Weighting** | Simple EMA | Volume-weighted EMA |
| **Divergence** | Price vs MACD | A/D vs MACD |
| **Volume Analysis** | None | Built-in strength filter |
| **Color System** | 2 colors (up/down) | 4+ colors (direction + volume) |
| **Leading/Lagging** | Lagging | More leading (volume-weighted) |
## Example Scenarios
### Scenario 1: Strong Bullish Signal
- **Chart**: MACD crosses above zero line
- **Histogram**: Dark green bars (#1B5E20) appearing
- **Volume**: Above 20-period average
- **Action**: Enter long, strong momentum with volume confirmation
### Scenario 2: Weak Bearish Signal
- **Chart**: MACD crosses below zero line
- **Histogram**: Light pink bars (#FFCDD2) appearing
- **Volume**: Below 20-period average
- **Action**: Avoid shorting, low volume = unreliable signal
### Scenario 3: Bullish Divergence Reversal
- **Chart**: Price making lower lows
- **Indicator**: A/D line trending up, MACD negative
- **Background**: Green shading appears
- **Histogram**: Transitions from red to dark green
- **Action**: Look for long entry on next dark green bar
### Scenario 4: V-Bottom Reversal
- **Chart**: Downtrend in place
- **Histogram**: Red bars start rising (becoming less negative)
- **Pattern**: Forms "V" shape at bottom
- **Confirmation**: Transitions to dark green bars
- **Action**: Bullish reversal signal, consider long entry
## Timeframe Recommendations
- **1-minute**: Scalping, very fast signals (noisy, use with caution)
- **5-minute**: Intraday momentum trading (recommended)
- **15-minute**: Swing entries, clearer trend signals
- **1-hour+**: Position trading, major trend identification
## Limitations
- **Requires volume data**: Will not work on instruments without volume
- **Lag during consolidation**: MACD is inherently trend-following
- **False signals in chop**: Sideways markets generate noise
- **Not a standalone system**: Should be combined with price action and risk management
## Version History
- **v3**: Removed traditional price MACD, using only volume-weighted A/D MACD with A/D divergence
- **v2**: Added A/D divergence detection, volume strength filtering, enhanced histogram colors
- **v1**: Basic MACD on A/D line with volume-weighted calculation
## Support & Further Reading
For questions, updates, or to report issues, refer to the main project documentation or contact the developer.
**Related Indicators in Suite:**
- **VMACDv3**: Volume-weighted MACD on price (not A/D)
- **RSIv2**: RSI with A/D divergence
- **DMI**: Directional Movement Index with A/D divergence
- **Elder Impulse**: Bar coloring system using volume-weighted MACD
---
*This indicator is for educational purposes. Always practice proper risk management and never risk more than you can afford to lose.*
Pivot Points Standard w/ Future PivotsPivot Points Standard with Future Projections
This indicator displays traditional pivot point levels with an added feature to project future pivot levels based on the current period's price action.
Key Features:
Multiple Pivot Types: Choose from Traditional, Fibonacci, Woodie, Classic, DM, and Camarilla pivot calculations
Flexible Timeframes: Auto-detect or manually select Daily, Weekly, Monthly, Quarterly, Yearly, and multi-year periods
Future Pivot Projections: Visualize potential pivot levels for the next period based on current price movement
Custom Price Scenarios: Test "what-if" scenarios by entering a custom close price to see resulting pivot levels
Customizable Display: Adjust line styles, colors, opacity, and label positioning for both historical and future pivots
Historical Pivots: View up to 200 previous pivot periods for context
Future Pivot Options:
The unique future pivot feature calculates what the next period's support and resistance levels would be using the current period's High, Low, Open, and either the current price or a custom price you specify for the closing value. Future pivots are displayed with customizable line styles (solid, dashed, dotted) and opacity to distinguish them from historical levels.
Use Cases:
Plan entries and exits based on projected support/resistance
Scenario analysis with custom price targets
Identify key levels before the period closes
Multi-timeframe pivot analysis
Works on all timeframes and instruments.
Supertrend + MACD + HMAIndicator Description: Supertrend + MACD + HMA
General Summary
It is a composite technical indicator that combines three analysis tools to generate buy and sell signals in institutional trading. It uses confirmation from multiple indicators to increase the precision of market entries.
Components
1. Supertrend (ST)
Function: Identifies the main market trend (bullish or bearish)
Parameters: ATR Length 10, Factor 3.0
Visualization:
Green line = Bullish trend
Red line = Bearish trend
Semi-transparent green/red background that fills the area according to direction
How it works: Uses ATR (Average True Range) to calculate dynamic support and resistance bands
2. MACD (Moving Average Convergence Divergence)
Function: Measures price momentum and direction
Parameters: Fast 18, Slow 144, Signal Smoothing 9
Components:
MACD Line (orange): Difference between two EMAs
Signal Line (purple): EMA of the MACD
Histogram (green/red columns): Difference between MACD and its signal
Green = Positive histogram (bullish momentum)
Red = Negative histogram (bearish momentum)
3. HMA 100 (Hull Moving Average)
Function: Identifies support/resistance level and price direction
Parameters: Length 100
Visualization: Blue thick line
Characteristics:
Less lag than traditional moving averages
Price > HMA = Bullish trend
Price < HMA = Bearish trend
Signal Logic
🟢 BUY SIGNAL
Generated when ANY of these conditions is met:
Total Confluence:
MACD positive (histogram > 0)
Price above HMA 100
Supertrend in Bullish mode
Supertrend Change:
Supertrend changes from Bearish to Bullish
MACD remains positive
Price above HMA
Price Crossover:
Price crosses above HMA (at candle close)
Supertrend is in Bullish mode
MACD is positive
🔴 SELL SIGNAL
Generated when ANY of these conditions is met:
Total Confluence:
MACD negative (histogram < 0)
Price below HMA 100
Supertrend in Bearish mode
Supertrend Change:
Supertrend changes from Bullish to Bearish
MACD remains negative
Price Crossover:
Price crosses below HMA (at candle close)
Supertrend is in Bearish mode
MACD is negative
Important Features
✅ Single Signal Per Type
Once a BUY is generated, no other BUY is generated until a SELL appears
Avoids multiple entries in the same direction
✅ Crossover Detection
The indicator generates signals at candle close when price crosses HMA
Allows capturing quick market moves
✅ Trend Changes
Detects when Supertrend changes direction
Provides early exits from the market
✅ Automatic Alerts
Push notifications when BUY or SELL is generated
Ideal for automated trading
Wick to Body Ratio TableHello, I'm Gomaa if don't know me and if you want to know more about me follow me on my social media accounts which my propose to teach people "How To Learn".
Use this link so you can find me: linktr.ee
Overview
The "Wick to Body Ratio Table" is a comprehensive analytical tool designed to provide traders with detailed insights into candle structure and price movement dynamics. This indicator breaks down each candle into its component parts and displays real-time statistics in an easy-to-read table format.
What It Does
This indicator analyzes the current candle and displays four key metrics for each component:
Ratio to Body - How large each wick is compared to the candle body
Percentage of Total - What portion of the entire candle each component represents
Move Percentage - The actual price movement as a percentage from the opening price
Component breakdown - Upper wick, body, lower wick, and totals
Key Features
Real-Time Analysis:
Updates automatically with every price tick on the current candle
Works seamlessly across ALL timeframes (1 second to monthly charts)
No lag or delay in calculations
Comprehensive Metrics:
Upper Wick: Shows rejection from higher prices and selling pressure
Closed Body: Displays the actual price change from open to close (bullish=green, bearish=red)
Lower Wick: Indicates rejection from lower prices and buying pressure
Total Wick: Combined wick analysis for overall volatility assessment
Whole Candle: Complete range from high to low with total movement percentage
Visual Design:
Color-coded rows for easy identification
Clear headers for each metric column
Positioned at top-right of chart (non-intrusive)
Professional table format with borders and proper spacing
How to Interpret the Data
Ratio to Body Column:
A ratio of 2.0x means that component is twice the size of the body
N/A appears for doji candles (when body = 0)
Higher ratios indicate stronger rejection or indecision
% of Total Column:
Shows what percentage each part contributes to the whole candle
All percentages always add up to 100%
Helps identify if price spent more time in wicks or body
Move % Column:
Calculated from the opening price
Shows actual volatility during the candle period
Example: 0.5% body with 3% total candle = high volatility but little net movement
Trading Applications
1. Rejection Analysis:
Long upper wicks at resistance = strong selling pressure
Long lower wicks at support = strong buying pressure
Wick-to-body ratios above 2:1 suggest significant rejection
2. Volatility Assessment:
Compare body move % to whole candle move %
Large difference indicates choppy price action
Small difference indicates trending movement
3. Candle Patterns:
Identify doji, hammer, shooting star patterns quantitatively
Measure strength of pin bars and rejection candles
Compare current candle structure to historical patterns
4. Market Sentiment:
Body % > 70% = strong directional movement
Wick % > 60% = indecision and rejection
Balanced distribution = consolidation
Settings & Customization
Table position can be modified in the code (top_right, top_left, bottom_right, bottom_left)
Colors can be adjusted for different components
Text size can be changed (size.small, size.normal, size.large)
Decimal precision can be modified in the str.tostring() functions
Best Practices
Use on higher timeframes (15m+) for more reliable signals
Combine with support/resistance levels for context
Look for extreme ratios (>3:1) for high-probability setups
Monitor the move % to gauge true volatility vs. net movement
Technical Details
Written in Pine Script v5
Zero division protection built-in
Handles all edge cases (gaps, doji, extreme wicks)
Lightweight and efficient (minimal CPU usage)






















